<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>会员管理</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>用户管理
                        <small></small>
                    </h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
                            <i class="fa fa-wrench"></i>
                        </a>

                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>

                    <div class="ibox-content">
                        <form method="post" id="" action="__CONTROLLER__/index" class="form-horizontal"
                              enctype="multipart/form-data">
                            <div class="col-sm-2">
                                <select class="form-control" required name="status" id="menu_id">
                                    <option value="-1">全部</option>
                                    <option <if condition="$status eq 2">selected</if>  value="2">未冻结</option>
                                    <option <if condition="$status eq 1">selected</if> value="1">已冻结</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <button id="btn" class="btn btn-success" type="submit">搜索</button>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" name="keyword" id="keyword"
                                           value="{$keyword}" placeholder="请输入用户ID">
                                </div>
                            </div>

                        </form>
                        <button class="btn btn-white btn-sm" onclick="exportExcel()">导出</button>
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                            <tr>
                                <th>会员ID</th>
                                <td>会员昵称</td>
                                <th>会员手机号</th>

                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="result" id="result">
                                <tr>
                                    <td>{$result.id}</td>
                                    <td>{$result['nickname']}</td>
                                    <td>{$result.mobile}</td>
                                    <td>

                                       <if condition="$result['frozen'] eq 1">
                                           <a href="__CONTROLLER__/frozen/id/{$result['id']}" onclick="if(confirm('确定冻结?')==false)return false;"><button class="btn btn-info">解冻</button></a>
                                           <else/>
                                        <a href="__CONTROLLER__/frozen/id/{$result['id']}" onclick="if(confirm('确定冻结?')==false)return false;"><button class="btn btn-danger">冻结</button></a>
                                       </if>
                                    </td>

                                </tr>
                            </volist>
                            </tbody>
                        </table>

                        <div class="pagination" style="margin:0px;">
                            {$page}
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
    <script src="__PUBLIC__/Theme1/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/layer/layer.js"></script>
    <script>




//        //导出
//        function Integral_export() {
//            var keyword = $("#keyword").val();
//            window.location.href = "__CONTROLLER__/expUser/keyword/" + keyword;
//
//        }
        function exportExcel(){
            var keyword = $("#keyword").val();
            window.location.href="__CONTROLLER__/expUser/keyword/"+keyword;

        }
    </script>
</body>
</html>
